package cn.kinggm520.controller;


import cn.kinggm520.service.AA;
import cn.kinggm520.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;

@RestController
@RequestMapping("/test")
public class TestController {

    @Resource
    private UserService userService;

    @GetMapping("/test1")
    public String test1() {
        String search = userService.search();
        return search;
    }


    @GetMapping("/add1")
    public String add1() throws IOException {
        userService.a();
        return "1";
    }



    @Resource
    private AA aa;

    @GetMapping("/getText")
    public String getText(){
        return aa.getText();
    }
}
